package com.tr.common.util;

/**
 * 为了统一管理返回信息提示，使用枚举类，枚举常量
 */
public enum ResultStatus {
    SUCCESS(200,"操作成功"),
    ERROR(500,"操作失败"),
    NOT_ALLOWED_ACCESS(5001,"不允许访问"),
    ARGUMENT_IS_NOT_NULL(5002,"参数不能为空");  //如果还想自定义其他返回异常，可以继续

    public void setReturncode(int returncode) {
        this.returncode = returncode;
    }

    public void setReturnMessage(String returnMessage) {
        this.returnMessage = returnMessage;
    }

    private int returncode;
    private String returnMessage;

    public int getReturncode() {
        return returncode;
    }

    public String getReturnMessage() {
        return returnMessage;
    }

    ResultStatus(int returncode, String returnMessage) {

        this.returncode = returncode;
        this.returnMessage = returnMessage;
    }
}
